Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update workflow controller initDB func #11760

Merged
merged 1 commit into from
Sep 6, 2023

Conversation

astraw99
Copy link
Contributor

@astraw99 astraw99 commented Sep 6, 2023

Fixes #11177

Motivation

To simplify the workflow controller initDB function.

Modifications

Reduced if else, just return the sqldb.NewMigrate(...).

Verification

After the code modification, tested the workflow-controller deployment in my environment with
multiple replicas (1, 5 and 10), all work ok.

10 for example:

workflow-controller-85bfb69457-292r6   1/1     Running   0          8s
workflow-controller-85bfb69457-5jc6l   1/1     Running   0          7s
workflow-controller-85bfb69457-b2fw2   1/1     Running   0          7s
workflow-controller-85bfb69457-kr4kv   1/1     Running   0          7s
workflow-controller-85bfb69457-lkz9r   1/1     Running   0          8s
workflow-controller-85bfb69457-ms5zf   1/1     Running   0          7s
workflow-controller-85bfb69457-qwcvx   1/1     Running   0          7s
workflow-controller-85bfb69457-sxdjj   1/1     Running   0          7s
workflow-controller-85bfb69457-w8hvr   1/1     Running   0          8s
workflow-controller-85bfb69457-xcd2x   1/1     Running   0          7s

Signed-off-by: astraw99 <wangchengiscool@gmail.com>
Copy link
Member

@Joibel Joibel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, it reads easier. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Controller issues, panics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Argo DB init conflict when deploy workflow-controller with multiple replicas
4 participants